<ol class="breadcrumb">
    <li><i class="fa fa-anchor"></i>
        &nbsp;电桩管理
    </li>
    <li>添加电桩</li>
</ol>
<div class="panel panel-mcit">
    <div class="panel-heading" >
        <h5 class="panel-title">添加电桩</h5>
    </div>
    <div class="panel-body" id="container">
        <div class="col-xs-12 info-center" style=" margin-top: 0px;">
            <form class="form-horizontal" method="post" action="__URL__/add" enctype="multipart/form-data"
                  id="form_check" style="margin-top: 10px;">
                <div class="unit_info" id="unit_info" style="margin-right: 5%;">
                    <div class="clearfix"></div>
                    <div class="col-xs-12">
                        <div class="panel-group" id="accordion">

                            <div class="col-xs-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;所在站点</label>

                                    <div class="col-sm-9">
                                        <if condition="$plant.id neq ''">
                                            <input type="hidden" name="ev_plant_id" value="{$plant.id}"/>
                                            <input type="text" class="form-control  "  name="name" value="{$plant.name}" readonly>
                                            <input type="hidden" name="plant_mode" value="{$plant.plant_mode}"/>
                                            <input type="hidden" name="char_mode" value="{$plant.char_mode}"/>
                                            
                                        <else />
                                            <input type="hidden" id="ev_plant_id" name="ev_plant_id" value=""/>
                                            <a class="btn btn-primary" data-toggle="modal" data-target="#companySearchForm"
                                               style="float:left;width: 23.7%;">点击搜索</a>
                                            <input class="form-control required"  name="name" value="" id="siteText" class="alert alert-success required form-control readonlyinput"
                                                   style="width: 76.3%;float: left; cursor: default;" readonly="true">
                                        </if>
                                        <span class="help-block error-block"></span>
                                    </div>
                                </div>
                            </div>
                            

                            <div class="col-xs-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;运行模式</label>

                                    <div class="col-sm-9">
                                            <input type="text" class="form-control  " value=""  name="plant_mode_title" readonly>
                                    </div>
                                    <input type="hidden" name="plant_mode" value=""/>
                                    <input type="hidden" name="char_mode" value=""/>
                                </div>
                            </div>
                            
                            
                            <div class="col-xs-6">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;目前已有桩数</label>

                                    <div class="col-sm-9">
                                            <input type="text" class="form-control  " value="{$plant.total_ev}"  name="total_ev" readonly>
                                    </div>
                                </div>
                            </div><div class="clearfix"></div>
                            
                            
                            <div class="panel panel-mcit" >
                                <div class="panel-heading"data-toggle="collapse" data-parent="#accordion"
                                     href="#collapse1" style="cursor: pointer;" >
                                    <h4 class="panel-title" >
                                        设备地址：
                                        <a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion"
                                           href="#collapse1"  id="id_{$i}">

                                        </a>
                                        <a style="float:right;"  class="add_new_panel" ><i class="glyphicon glyphicon-plus"></i></a>
                                        <a style="float:right;margin-right:5px;"  class="del_this_panel" ><i class="glyphicon glyphicon-minus"></i> </a>
                                        <!--  <a style="float:right; margin-right:1%;" class="hide_this_panel" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" ><i class="glyphicon glyphicon-minus"></i> </a>-->
                                    </h4>
                                </div>
                                <div id="collapse1" class="panel-collapse collapse in">
                                    <div class="panel-body">

                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;所在地电桩编号</label>

                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required " maxlength="4"  title="" placeholder="" name="charID_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;设备地址</label>

                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required job_name" maxlength="16" title="id_{$i}" placeholder="" name="key_link_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div><div class="clearfix"></div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;SLINK（状态ip）</label>

                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required"  title="" placeholder="" name="s_link_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;HLINK（硬件ip）</label>
                                                <div class="col-sm-5">
                                                    <input type="text" class="form-control required"  title="" placeholder="" name="h_link_1">
                                                    <span class="help-block error-block"></span>
                                                </div><span class="pull-left">端<br>口</span>
                                                <div class="col-sm-2">
                                                    <input type="text" style="width: 82px" class="form-control required"  title="" placeholder="" name="h_link_port_1">
                                                </div>
                                            </div>
                                        </div><div class="clearfix"></div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">&nbsp;WIFI编号</label>
                                                <div class="col-sm-8">
                                                    <div class="input-group">
                                                        <input type="hidden" name="wifi_1" value="1" id="" checked>
                                                        <input type="text" class="form-control" name="card_wifi_1"
                                                               id="person_num" style="border-color:#cccccc; ">
                                                      <span class="input-group-addon" style="padding:0px 12px;">
                                                        <div class="checkbox" id="nolimit">
                                                            <label>
                                                                <input type="checkbox" name="wifi_1" value="0" id="checkbox"> 不支持
                                                            </label>
                                                        </div>
                                                      </span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;电流类型</label>
                                                <div class="col-sm-8" >
                                                    <select  name="evc_type_1" class="form-control required">
                                                        <option value="2">交流</option>
                                                        <option value="1">直流</option>
                                                        <option value="3">混合</option>
                                                    </select>
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div><div class="clearfix"></div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;电桩属性</label>
                                                <div class="col-sm-8" >
                                                    <select  name="evc_quantity_1" class="form-control required">
                                                        <option value="1">单枪</option>
                                                        <option value="2">双枪</option>
                                                    </select>
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;GPRS卡号</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required job_name" name="card_gprg_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div><div class="clearfix"></div>
                                        
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;SN</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required" name="evc_sn_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;蓝牙对码</label>
                                                <div class="col-sm-8">
                                                    <input type="text" class="form-control required" name="evc_bluetoothcode_1">
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div>
                                        
                                        
                                        <div class="clearfix"></div>
                                        
                                        <div class="col-xs-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;生产厂商及设备类型</label>
                                                <div class="col-sm-10 control-whole">
                                                    <select id="Manu-f" name="ev_fac_code_1" class="form-control" style="">
                                                        <option value="0">--</option>
                                                        <volist name="Manu" id="v">
                                                            <option value="{$v.fac_login_name}">{$v.fac_name}</option>
                                                        </volist>
                                                    </select>
                                                    <select id="Manu-s" name="ev_fac_type1_1" class="form-control" style="border-left:0" >
                                                        <option value="0">--</option>
                                                        <volist name="Manu" id="v">
                                                            <volist name="v['area']" id="vv">
                                                                <option value="{$vv.id}" class="{$vv.pid}" >{$vv.name}</option>
                                                            </volist>
                                                        </volist>
                                                    </select>
                                                    <select id="Manu-t" name="ev_fac_type2_1" class="form-control" style="border-left:0" >
                                                        <option value="0">--</option>
                                                        <volist name="Manu" id="v">
                                                            <volist name="v['area']" id="vv">
                                                                <volist name="vv['area']" id="vvv">
                                                                    <option value="{$vvv.id}" class="{$vvv.pid}" >{$vvv.name}</option>
                                                                </volist>
                                                            </volist>
                                                        </volist>
                                                    </select>
                                                    <span class="help-block error-block"></span>
                                                </div>
                                            </div>
                                        </div><div class="clearfix"></div>
                                        <div class="col-xs-6">
                                            <div class="form-group">
                                                <div class="col-sm-offset-4 col-sm-8">
                                                    <a data-toggle="collapse" data-parent="#accordion" href="#collapse1" class="btn btn-primary hide_this_panel">
                                                        <i class="glyphicon glyphicon-chevron-up"></i>&nbsp;收起</a>
                                                    <a type="submit" class="btn btn-warning add_new_panel" data-toggle="collapse" data-parent="#accordion" href="#collapse1" ><i class="glyphicon glyphicon-pencil"></i>&nbsp;添加</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="creat_flag"></div>
                </div>

                <div class="col-xs-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;建立时间</label>

                        <div class="col-sm-9">
                            <input type="text" class="form-control required form_month" placeholder="点击选择" name="sys_creat_time" id="establish_time" data-date-format="yyyy-mm-dd" data-link-format="yyyy-mm-dd">
                            <span class="help-block error-block"></span>
                            <span class="help-block"></span>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6">
                    <div class="form-group">
                        <div class="col-sm-offset-4 col-sm-8">
                            <button type="submit" class="btn btn-primary"><i class="fa fa-upload"></i>&nbsp;确定</button>
                            <a href="javascript:history.go(-1);" class="btn btn-warning"><i class="fa fa-mail-reply"></i>&nbsp;返回</a>
                        </div>
                    </div>
                </div>
                <input style="display: none;" name="recruit_num" id="recruit_num" value="1">
            </form>
        </div>
    </div>
</div>
<!-- 搜索站点 -->

<div class="modal fade" id="companySearchForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">搜索站点</h4>
            </div>
            <div class="modal-body">
                <div style="margin-top: 10px; width: 1200px;">
                    <div class="col-xs-6 search-col">
                        <div class="input-group">
                            <span class="input-group-addon" >所在地</span>
                            <select id="location-f" name="location_f_1" class="form-control" style="width:130px;">
                                <option value="0">--</option>
                                <volist name="china" id="vo">
                                    <option value="{$vo.code}">{$vo.name}</option>
                                </volist>
                            </select>

                            <select id="location-s" name="location_s_1" class="form-control" style="width:130px;border-left:0">
                                <option value="0">--</option>
                                <volist name="china" id="vo">
                                    <volist name="vo['area']" id="vovo">
                                        <option value="{$vovo.code}" class="{$vo.code}" >{$vovo.name}</option>
                                    </volist>
                                </volist>
                            </select>

                            <select id="location-t" name="location_t_1" class="form-control " style="width:130px;border-left:0">
                                <option value="0">--</option>
                                <volist name="china" id="vo">
                                    <volist name="vo['area']" id="vovo">
                                        <volist name="vovo['area']" id="vovovo">
                                            <option value="{$vovovo.code}" class="{$vovo.code}" >{$vovovo.name}</option>
                                        </volist>
                                    </volist>
                                </volist>
                            </select>
                            <button style="margin-left: 10px;" type="submit" class="btn btn-primary" id="companySearchBtn"><i class="fa fa-search"></i>&nbsp;搜索
                            </button>
                        </div>
                    </div>
                </div>
                搜索结果（点击名称进行选择）：
                <div class="alert alert-success" id="searchResult">
                </div>
            </div>
        </div>
    </div>
</div>
<import file="js.maskedinput"/>
<import file="js.jquery#chained" />
<import file="js.ueditor_light.ueditor#config"/>
<import file="js.ueditor_light.ueditor#all"/>
<import file="js.ueditor_light.lang.zh-cn.zh-cn"/>
<import type='css' file="css.datetimepicker"/>
<import file="js.bootstrap-datetimepicker#min"/>
<import file="js.bootstrap-datetimepicker#zh-CN"/>
<style>
    .readonlyinput {
        cursor: default;
    }

    .pointcheckbox {
        cursor: pointer;
    }

    .schoolnoselect {
        color: #2b669a;
    }
</style>
<script>
    $(document).ready(function(){
        $("#location-s").chained("#location-f");
        $("#location-t").chained("#location-s");
        $("#Manu-s").chained("#Manu-f");
        $("#Manu-t").chained("#Manu-s");

        //搜索站点
        $("#companySearchBtn").click(function () {
            $.post("__URL__/AjaxPlantSearch",
                    {
                        location_f_1: $("#location-f").val(),
                        location_s_1: $("#location-s").val(),
                        location_t_1: $("#location-t").val()
                    },
                    function (data, status) {
                        //alert(data);
                        if (status == "success") {
                            $("#searchResult").html(data);
                        }
                    }
            );
        });
        //传站点数据
        $(".modal-body").on("click", '.siteSelect', function () {
            var plantID  = $(this).attr("data-nid");//站点id
            $("#ev_plant_id").val(plantID);
            var siteName = $(this).text();//站点名称
            $("#siteText").val(siteName);
            var total_ev = $(this).attr("data-pid");//目前已有桩数
            $("input[name='total_ev']").val(total_ev);
            
            var plant_mode = $(this).attr("data-plant_mode");//当前所选站点的运行模式
            $("input[name='plant_mode']").val(plant_mode);
            $("input[name='char_mode']").val(plant_mode);
            
            if (plant_mode==0 || plant_mode==''){
            	$("input[name='plant_mode_title']").val('线上');
            }else if(plant_mode==1){
            	$("input[name='plant_mode_title']").val('线下');
            }
        });
    })
</script>
<script>
var panel_num=1;
$(document).ready(function () {

    $("body").on("click",".marjorBtn",function(){
        click_temp=$(this).attr("id");
    });

    $(".hide_this_panel").click(function (){

    });

    $("body").on("click",'.add_new_panel',function(){
        panel_num++;
        $('#recruit_num').val(panel_num);
        $("#creat_flag").append(
                get_panel_html(panel_num)
        );
    });

    $("body").on("click",'.del_this_panel',function(){
        if(confirm("确定要删除当前信息吗？"))
            if(panel_num==1)
            {
                alert("当前只有一条信息，不能删除！");
            }
            else {
                panel_num--;
                $('#recruit_num').val(panel_num);
                $(this).parent().parent().parent().parent().parent().remove();
            }
    });

    $("#nolimit").click(function () {
        var checkbox = document.getElementById("checkbox");
        var temp;
        if (checkbox.checked) {
            //             temp=$("#person_num").val();
            $("#person_num").val(" ");
            $("#person_num").enable(false);
        }
        else {
            $("#person_num").enable(true);
            //          $("#person_num").val(temp);
        }

    });

    $(".pointcheckbox").click(function () {
        if (this.previousElementSibling.checked)
            this.previousElementSibling.checked = false;
        else this.previousElementSibling.checked = true;
    });

    $(".form_month").datetimepicker({
        language: 'zh-CN',
        autoclose: true,
        startView: 'month',
        minView: 'month',
        todayBtn: false,
        viewSelect: 'year',
        pickerPosition: "bottom-left"
    });

    jQuery.extend(jQuery.validator.messages, {
        required: "必选字段",
        number: "必须为数字"
    });

    $("#form_check").validate(
            {
                //debug: true,
                //调试模式取消submit的默认提交功能
                onkeyup: false,
                errorClass: "mcit-error",
                validClass: "mcit-valid",
                email:true,
                // submitHandler: function(form){
                //     //alert("提交服务器");
                //     form.submit();提交表单
                // },
                rules: {
                    num: {
                        minlength: 9
                    }
                },
                messages: {
                    num: {
                        minlength: "格式不对"
                    }
                },
                errorPlacement: function (error, element) {
                    error.appendTo(element.next());
                },
                highlight: function (element, errorClass) {
                    //$(element).addClass(errorClass);
                    $(element).parent().addClass(errorClass);
                    $(element).next().css("display", "block");
                    $(element).next().next().hide();
                },
                success: function (label) {
                    label.parent().next().hide();
                    label.addClass('mcit-valid');
                    label.parent().parent().addClass('mcit-valid');
                    label.parent().css("display", "block");
                    label.html('<i class="fa fa-check"></i>&nbsp;OK');
                }
            }
    );
    $(".schoolTitle").click(function () {
        $(".selectcontent").hide(); //隐藏当前容器
        var contain = $(this).attr("title");
        $("#" + contain).show();
    });

    $("body").on("blur",".job_name",function (){
        $("#"+$(this).attr("title")).text($(this).val());
    });
    $("#comfirmSelect").click(function () {
        var checkflag = 1;
        var checkcount = 0;
        var majorID = "";
        var majortxt = "";
        $(".majortext").each(function () {
            if (this.checked == true) {
                checkflag = 0;
                majorID += $(this).attr("id");
                majortxt += $(this).next().text();
                checkcount++;
            }
            if (checkflag == 0) {
                majorID += ",";
                majortxt += ",";
                checkflag = 1;
            }
        })
        $("#majorText_"+click_temp).val(majortxt);
        $("#majorID_"+click_temp).val(majorID);
    });
    function get_panel_html(panel)
    {
        return '<div class="col-xs-12">' +
                '<div class="panel-group" id="accordion">' +
                '<div class="panel panel-mcit">' +
                '<div class="panel-heading" data-toggle="collapse" data-parent="#accordion" href="#collapse'+panel+'" style="cursor: pointer;">'+
                '    <h4 class="panel-title">设备地址：' +
                '<a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#collapse'+panel+'" id="id_'+panel+'"></a>'+
                '        <a style="float:right;"  class="add_new_panel" ><i class="glyphicon glyphicon-plus"></i></a>'+
                '<a style="float:right;margin-right:5px;"  class="del_this_panel" ><i class="glyphicon glyphicon-minus"></i> </a>' +
                '</h4>' +
                '</div>' +
                '<div id="collapse'+panel+'" class="panel-collapse collapse in">' +
                '<div class="panel-body">' +
                '<div class="col-xs-6">' +
                '<div class="form-group">' +
                '<label class="col-sm-4 control-label">' +
                '<i class="fa fa-asterisk required-fa"></i>&nbsp所在地电桩编号</label>' +
                '<div class="col-sm-8">' +
                '<input type="text" class="form-control required job_name" maxlength="4"  title="" placeholder="" name="charID_'+panel+'">'+
                '<span class="help-block error-block"></span>' +
                '</div></div></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;设备地址</label>'+
                '<div class="col-sm-8">'+
                '<input type="text" class="form-control required job_name" title="id_'+panel+'" maxlength="16" name="key_link_'+panel+'">'+
                '<span class="help-block error-block"></span></div></div></div>' +
                '<div class="clearfix"></div>'+
                '<div class="col-xs-6">'+
                '<div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;SLINK（状态ip）</label>'+
                '<div class="col-sm-8">'+
                '<input type="text" class="form-control required"  name="s_link_'+panel+'">'+
                '<span class="help-block error-block"></span></div></div></div>'+
                '<div class="col-xs-6"><div class="form-group"><label class="col-sm-4 control-label">'+
                '<i class="fa fa-asterisk required-fa"></i>&nbsp;HLINK（硬件ip）</label>'+
                '<div class="col-sm-5"><input type="text" class="form-control required" name="h_link_'+panel+'">'+
                '<span class="help-block error-block"></span></div><span class="pull-left">端<br>口</span>'+
                '<div class="col-sm-2">'+
                '<input type="text" style="width: 82px" class="form-control required"  name="h_link_port_'+panel+'">'+
                '</div></div></div>'+
                '<div class="clearfix"></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label">&nbsp;WIFI编号</label>'+
                '<div class="col-sm-8"><div class="input-group">'+
                '<input type="hidden" value="1" name="wifi_'+panel+'" checked>'+
                '<input type="text" class="form-control"  name="card_wifi_'+panel+'" id="person_num" style="border-color:#cccccc; ">'+
                '<span class="input-group-addon" style="padding:0px 12px;">'+
                '<div class="checkbox" id="nolimit">'+
                '<label><input type="checkbox" value="0" id="checkbox" name="wifi_'+panel+'"> 不支持</label>'+
                '</div></span></div></div></div></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;电流类型</label>'+
                '<div class="col-sm-8" ><select   class="form-control required" name="evc_type_'+panel+'"><option value="2">交流</option>'+
                '<option value="1">直流</option><option value="3">混合</option></select>'+
                '<span class="help-block error-block"></span></div></div></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa">'+
                '</i>&nbsp;电桩属性</label><div class="col-sm-8" >'+
                '<select  name="evc_quantity_'+panel+'" class="form-control required">'+
                '<option value="1">单枪</option><option value="2">双枪</option>'+
                '</select><span class="help-block error-block"></span>'+
                '</div></div></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;GPRS卡号</label>'+
                '<div class="col-sm-8">'+
                '<input type="text" class="form-control required "  name="card_gprg_'+panel+'">'+
                '<span class="help-block error-block"></span></div></div></div>'+
                '<div class="clearfix"></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;SN</label>'+
                '<div class="col-sm-8"><input type="text" class="form-control required" name="evc_sn_'+panel+'">'+
                '<span class="help-block error-block"></span></div></div></div>'+
                '<div class="col-xs-6"><div class="form-group">'+
                '<label class="col-sm-4 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;蓝牙对码</label>'+
                '<div class="col-sm-8"><input type="text" class="form-control required" name="evc_bluetoothcode_'+panel+'">'+
                '<span class="help-block error-block"></span></div></div></div><div class="clearfix"></div>'+
                '<div class="col-xs-12"><div class="form-group">'+
                '<label class="col-sm-2 control-label"><i class="fa fa-asterisk required-fa"></i>&nbsp;生产厂商及设备类型</label>'+
                '<div class="col-sm-10 control-whole"><select id="Manu-f_'+panel+'" name="ev_fac_code_'+panel+'" class="form-control" style="">'+
                '<option value="0">--</option><volist name="Manu" id="v"><option value="{$v.fac_login_name}">{$v.name}</option>'+
                '</volist></select><select id="Manu-s_'+panel+'" name="ev_fac_type1_'+panel+'" class="form-control" style="border-left:0" >'+
                '<option value="0">--</option><volist name="Manu" id="v"><volist name="v['area']" id="vv">'+
                '<option value="{$vv.id}" class="{$vv.pid}" >{$vv.name}</option></volist></volist></select>'+
                '<select id="Manu-t_'+panel+'" name="ev_fac_type2_'+panel+'" class="form-control" style="border-left:0" >'+
                '<option value="0">--</option><volist name="Manu" id="v"><volist name="v['area']" id="vv">'+
                '<volist name="vv['area']" id="vvv"><option value="{$vvv.id}" class="{$vvv.pid}" >{$vvv.name}</option>'+
                '</volist></volist></volist></select><span class="help-block error-block"></span>'+
                '</div></div></div><div class="clearfix"></div>'+
                '<div class="col-xs-6"><div class="form-group"> <div class="col-sm-offset-4 col-sm-8"><a data-toggle="collapse" data-parent="#accordion" href="#collapse'+panel+'" class="btn btn-primary hide_this_panel">'+
                '<i class="glyphicon glyphicon-chevron-up"></i>&nbsp;收起</a>'+
                '<a style="margin-left: 2%;" type="submit" class="btn btn-warning add_new_panel" data-toggle="collapse" data-parent="#accordion" href="#collapse'+panel+'" >'+
                '<i class="glyphicon glyphicon-pencil"></i>&nbsp;添加</a></div></div></div>'+
                '<script type="text/javascript">$("#Manu-s_'+panel+'").chained("#Manu-f_'+panel+'");'+
                '  $("#Manu-t_'+panel+'").chained("#Manu-s_'+panel+'");</s'+'cript>';
    }
});
</script>